Public Class ConnectSummary_Factory
    Public Sub UpdateSummary( _
        ByVal sDate As Date, _
        ByVal lDatabaseID As Long, _
        ByVal lSessionCount As Long, _
        ByVal lServerConnections As Long, _
        ByVal lDatabaseConnections As Long)

        Dim oFactory As New DBConnectSummary_Factory

        Dim oConnectSummary As ConnectSummary = oFactory.GetExistingSummary( _
                                                            sDate, _
                                                            lDatabaseID)

        If oConnectSummary Is Nothing Then
            oConnectSummary = New ConnectSummary()
            oConnectSummary.Date = sDate
            oConnectSummary.DatabaseID = lDatabaseID
        End If

        With oConnectSummary
            .SessionCount = .SessionCount + lSessionCount
            .ServerConnections = .ServerConnections + lServerConnections
            .DatabaseConnections = .DatabaseConnections + lDatabaseConnections
        End With

        oConnectSummary.Save()
    End Sub

End Class
